package com.topgay.domain;

import java.io.Serializable;

public class Declaration implements Serializable{

	private int declarationNo;	//declaration_no
	private String id;
	private String nickname;
	private String content;
	private String assaulterId;	//assaulter_id - 가해자 아이디
	private String assaulterNickname; //assaulter_nickname가해자 별명
	private String result;
	private String creDate;	//cre_date
	
	public Declaration() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Declaration(int declarationNo, String id, String nickname,
			String content, String assaulterId, String assaulterNickname,
			String result, String creDate) {
		this.declarationNo = declarationNo;
		this.id = id;
		this.nickname = nickname;
		this.content = content;
		this.assaulterId = assaulterId;
		this.assaulterNickname = assaulterNickname;
		this.result = result;
		this.creDate = creDate;
	}

	public int getDeclarationNo() {
		return declarationNo;
	}

	public void setDeclarationNo(int declarationNo) {
		this.declarationNo = declarationNo;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getAssaulterId() {
		return assaulterId;
	}

	public void setAssaulterId(String assaulterId) {
		this.assaulterId = assaulterId;
	}

	public String getAssaulterNickname() {
		return assaulterNickname;
	}

	public void setAssaulterNickname(String assaulterNickname) {
		this.assaulterNickname = assaulterNickname;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getCreDate() {
		return creDate;
	}

	public void setCreDate(String creDate) {
		this.creDate = creDate;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((assaulterId == null) ? 0 : assaulterId.hashCode());
		result = prime
				* result
				+ ((assaulterNickname == null) ? 0 : assaulterNickname
						.hashCode());
		result = prime * result + ((content == null) ? 0 : content.hashCode());
		result = prime * result + ((creDate == null) ? 0 : creDate.hashCode());
		result = prime * result + declarationNo;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result
				+ ((nickname == null) ? 0 : nickname.hashCode());
		result = prime * result
				+ ((this.result == null) ? 0 : this.result.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Declaration other = (Declaration) obj;
		if (assaulterId == null) {
			if (other.assaulterId != null)
				return false;
		} else if (!assaulterId.equals(other.assaulterId))
			return false;
		if (assaulterNickname == null) {
			if (other.assaulterNickname != null)
				return false;
		} else if (!assaulterNickname.equals(other.assaulterNickname))
			return false;
		if (content == null) {
			if (other.content != null)
				return false;
		} else if (!content.equals(other.content))
			return false;
		if (creDate == null) {
			if (other.creDate != null)
				return false;
		} else if (!creDate.equals(other.creDate))
			return false;
		if (declarationNo != other.declarationNo)
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (nickname == null) {
			if (other.nickname != null)
				return false;
		} else if (!nickname.equals(other.nickname))
			return false;
		if (result == null) {
			if (other.result != null)
				return false;
		} else if (!result.equals(other.result))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Declaration [declarationNo=" + declarationNo + ", id=" + id
				+ ", nickname=" + nickname + ", content=" + content
				+ ", assaulterId=" + assaulterId + ", assaulterNickname="
				+ assaulterNickname + ", result=" + result + ", creDate="
				+ creDate + "]";
	}
	
	
}
